#include <iostream>

class CubeBox
{

public:
    void set_height(int height)
    {
        this->height = height;
    }

    void set_width(int width)
    {
        this->width = width;
    }

    void set_length(int length)
    {
        this->length = length;
    }

    int get_width()
    {
        return width;
    }

    int get_height()
    {
        return height;
    }

    int get_length()
    {
        return length;
    }

    int get_area()
    {
        return 2 * (length * width + length * height + width * height);
    }

    int get_volumn()
    {
        return height * width * length;
    }

    bool equals(CubeBox cube)
    {
        if (this->length == cube.length && this->width == cube.width && this->height == cube.height)
        {
            return true;
        }
        return false;
    }

    void show_info()
    {
        std::cout << "************************ 立方体 *************************" << std::endl;
        std::cout << "*\t\t\t长：" << get_length() << "\t\t\t\t*" << std::endl;
        std::cout << "*\t\t\t宽：" << get_width() << "\t\t\t\t*" << std::endl;
        std::cout << "*\t\t\t高：" << get_height() << "\t\t\t\t*" << std::endl;
        std::cout << "*\t\t\t表面积：" << get_area() << "\t\t\t*" << std::endl;
        std::cout << "*\t\t\t体积：" << get_volumn() << "\t\t\t*" << std::endl;
        std::cout << "*********************************************************" << std::endl;
    }

private:
    int height;
    int length;
    int width;
};

bool equals(CubeBox cube1, CubeBox cube2)
{
    if (cube1.get_length() == cube2.get_length() &&
        cube1.get_width() == cube2.get_width() &&
        cube1.get_height() == cube2.get_height())
    {
        return true;
    }
    return false;
}

int main(int argc, char const *argv[])
{
    CubeBox cube1;
    cube1.set_height(12);
    cube1.set_length(12);
    cube1.set_width(10);

    std::cout << "*\t\t\t长：" << cube1.get_length() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t宽：" << cube1.get_width() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t高：" << cube1.get_height() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t表面积：" << cube1.get_area() << "\t\t\t*" << std::endl;
    std::cout << "*\t\t\t体积：" << cube1.get_volumn() << "\t\t\t*" << std::endl;

    cube1.show_info();

    CubeBox cube2;
    cube2.set_height(121);
    cube2.set_length(12);
    cube2.set_width(10);

    std::cout << "*\t\t\t长：" << cube2.get_length() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t宽：" << cube2.get_width() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t高：" << cube2.get_height() << "\t\t\t\t*" << std::endl;
    std::cout << "*\t\t\t表面积：" << cube2.get_area() << "\t\t\t*" << std::endl;
    std::cout << "*\t\t\t体积：" << cube2.get_volumn() << "\t\t\t*" << std::endl;

    cube2.show_info();

    std::cout << std::endl;
    std::cout << std::endl;

    std::cout << "cube1.equals(cube2) is " << cube1.equals(cube2) << std::endl;
    std::cout << "equals(cube1, cube2) is " << equals(cube1, cube2) << std::endl;

    return 0;
}
